package com.zqg8512.netty.reponse;

import io.netty.channel.Channel;
import io.netty.channel.ChannelInboundHandler;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.http.HttpServerCodec;

/**
 * @Author zengqianggang
 * @Description //TODO
 * Author VPN
 * @Date 2019/9/30 10:24
 * @Version 1.0
 **/
public class InitChannel extends ChannelInitializer<SocketChannel> {
    @Override
    protected void initChannel(SocketChannel ch) throws Exception {

        ChannelPipeline pipeline = ch.pipeline();

        pipeline.addLast("HttpServerCodec", new HttpServerCodec());

        pipeline.addLast("MyChannelParse", new MyChannelParse());

    }
}
